<template>
    <VueUnity :unity="unityContext" width="1280" height="900"></VueUnity>
</template>

<script setup>
import UnityWebgl from 'unity-webgl';
import VueUnity from 'unity-webgl/vue';

const unityContext = new UnityWebgl({
    loaderUrl: '/unity/Build/unity.loader.js',
    dataUrl: '/unity/Build/unity.data.gz',
    frameworkUrl: '/unity/Build/unity.framework.js.gz',
    codeUrl: '/unity/Build/unity.wasm.gz',
})

unityContext.on('mounted',() => console.log('Unity加载完成...'))

</script>


  